<template>
  <div class="goods">
    <!-- 将每个item对象数据传入goods-list-item子组件，让其展示 -->
    <goods-list-item
      class="goods-item"
      v-for="item in goods"
      :goodsItem="item"
      :tabType="tabType"
    ></goods-list-item>
  </div>
</template>

<script>
  import GoodsListItem from './GoodsListItem'

  export default {
    name: "",
    props: {
      goods: {
        type: Array,
        default(){
          return []
        }
      },
      tabType: {
        type: String,
        default: 'pop'
      }
    },
    created(){
      // console.log(this.tabType);
    },
    components: {
      GoodsListItem
    }
  }
</script>

<style lang="less" scoped>
.goods{
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 2px;
  display: flex;
  .goods-item{
    width: 48%;
  }
}
</style>
